import service from '@/assets';
import JWTSecret from 'haibei-secret';
import { evnConfigPath } from "@/assets/utils";
import common from './common'
const httpService = {
    //1.1.1.	用户登录
    haiBeiServerLogin(params = {}) {
        params = JWTSecret.jwt(params);
        return service
            .post('loginAccount.action', { encry: params })
            .then(res => res.data).catch(error => { console.log(error) });
    },
    //1.1.10.	修改密码
    haiBeiServerChangePassword(params = {}) {
        params = JWTSecret.jwt(params);
        return service
            .post('changePassword.action', { encry: params })
            .then(res => res.data).catch(error => { console.log(error) });
    },
    //1.1.2.	退出登录
    haiBeiServerLoginOut(params = {}) {
        params = JWTSecret.jwt(params);
        return service
            .post('loginOut.action', { encry: params })
            .then(res => res.data).catch(error => { console.log(error) });
    },
    //1.1.3.	查询用户有权限的菜单
    haiheiServerMenuItem(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryUserAuthMenu.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //1.1.3.	用户管理
    haiheiServerUserList(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryUserByPage.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },

    //addUser       
    haiheiAddUserServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('addUser.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //updateUser修改  
    haiheiUpdateUserServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('updateUser.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    // delUser删除
    haiheiDeleteUserServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('delUser.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    // 重置resetUserPwd
    haiheiResetUserPwdServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('resetUserPwd.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //查询银行信息 
    haiheiQueryBankInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryBankInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //修改银行信息
    haiheiUpdateBankInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('updateBankInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //查询点差操作 
    haiheiQueryIncrementInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryIncrementInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //编辑点差操作 
    haiheiUpdateIncrementInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('updateIncrementInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },

    //代理管理  addProxyInfo  
    haiheiAddProxyInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('addProxyInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //代理管理    updateProxyInfo   
    haiheiUpdateProxyInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('updateProxyInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //代理管理       resetPwdForProxyUser   
    haiheiResetPwdForProxyUserServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('resetPwdForProxyUser.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //代理管理          setStateForProxyUser    
    haiheiSetStateForProxyUserUserServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('setStateForProxyUser.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //代理管理              queryProxyInfo
    haiheiQueryProxyInfoUserServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryProxyInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //权利金
    haiheiQueryRoyaltyInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryRoyaltyInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //询价

    haiheiQuerRoyaltyValueServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('querRoyaltyValue.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //代理订单查询
    haiheiQueryOrderInfoForProxyServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryOrderInfoForProxy.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //代理订单详情查询
    haiheiQueryOrderSubInfoForProxyServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryOrderSubInfoForProxy.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },



    //master订单查询
    haiheiQueryOrderInfoForMasterServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryOrderInfoForMaster.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //master订单详情查询
    haiheiQueryOrderSubInfoForMasterServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryOrderSubInfoForMaster.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },

    //确认下单
    haiheiEnterSucOrdersServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('enterSucOrders.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },

    //标记作废  

    haiheiCancelOrdersServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('cancelOrders.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },

    //申请行全

    haiheiApplyExerciseServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('applyExercise.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },

    //驳回
    haiheiRefuseExerciseServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('refuseExercise.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //行权录入

    haiheiExerciseOperationServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('exerciseOperation.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //行权liebiao
    haiheiQueryExerciseInfoByPageServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('queryExerciseInfoByPage.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },


    //创建订单
    haiheiAddOrderInfoServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('addOrderInfo.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },
    //通知
    haiheiQuerySysMessageServer(params = {}) {
        params = JWTSecret.jwt(params);
        return service.post('querySysMessage.action', { encry: params }).then(res => res.data).catch(error => { console.log(error) });
    },





}
export default Object.assign({}, httpService, common)